package com.xuchao.rabbit.b4;

import java.util.HashMap;
import java.util.Map;
import java.util.TreeMap;

/**
 * @Author xuchao
 * @Date:2023/6/7 20:13
 * @description TODO
 * @Version 1.0
 */
public class a {
    public static void main(String[] args) {
        TreeMap<Integer, String> map = new TreeMap<Integer, String>();
        map.put(1,"1");
        map.put(2,"2");
        map.put(3,"3");
        map.put(4,"4");
        map.put(5,"5");
        Map<Integer,String> mapClear = map.headMap(3);
        System.out.println(mapClear);
        mapClear.clear();
        System.out.println(mapClear);
        System.out.println(map);
    }
}
